<!--
 * Date: 2018年10月23日 13:28:06
 * LastEditors: lvyou
 * LastEditTime: 2020年04月16日 16:26:30
 * FilePath: \youlinweb-master\src\pages\mine\personalinfor\personalinfor.vue
 * copyright(c) 2019-2025 版权为浙江双城网络科技集团有限公司所有，违者必究。
 -->
<template>
<div>
  <ylheader :leftsvg="true" :title="'个人信息'"></ylheader>
    <div class="account v-c" v-for="(items,index) in titlelist" :key="index" @click="gourl(index)">
      <span class="title">{{items}}</span>
      <span class="title" v-if="index==0">{{nickName}}</span>
      <i class="yl-2r" v-else></i>
    </div>
</div>
</template>
<script>
let count=0
import api from "src/api/index";
export default {
  name:"personalinfor",
  data(){
    return{
      nickName:localStorage.getItem("nickName"),
      titlelist:["账户","收货地址"]
    }
  },
  components:{
    api
  },
  mounted(){
    
  },
  methods:{
    gourl(index){
      if(index==1){
        this.$router.push({path:"/address",query:{tag:3}})
      }else{
        this.showEruda()
      }

    },
     showEruda() {
      if (count >= 7) {
        var erdua = sessionStorage.getItem("eruda");
        if (!erdua || erdua === "false") {
          sessionStorage.setItem("eruda", "true");
        } else {
          sessionStorage.setItem("eruda", "false");
        }
        location.reload();
      }
      count++;
    },

  }
}
</script>

<style lang="less" scoped>
.account{
  border-bottom: 1px solid #e6e6e6;
  height: 0.9rem;
  background: #ffffff;
  padding: 0 0.3rem;
  justify-content: space-between;
  font-size: 0.28rem;
  .title{
    font-size: 0.3rem;
    color: #494949;
  }
 
}
</style>
